#include "account.h"
#include "../config/config.h"

Account::Account()
:PjApiUaAccount("","","","","")
{
}

Account::Account(std::string username, std::string password)
:PjApiUaAccount(username,
                password,
                Config::getInstance()->getSIPDomain(),
                Config::getInstance()->getSIPRegistar(),
                Config::getInstance()->getSIPProxy())
{
}

Account::Account(Account& account)
:PjApiUaAccount(account)
{
    copy(account);
}

Account &Account::operator=(Account &account)
{
    if(&account != this)
    {
        copy(account);
    }
    return *this;
}

Account::~Account()
{
}

void Account::copy(Account &account)
{
    //To do

    m_id = account.getAccountID();

    m_username = account.getUsername();

    m_password = account.getPassword();

    m_display = account.getDisplay();

    m_domain = account.getDomain();

    m_registar = account.getRegistar();

    m_proxy = account.getProxy();

    m_description = account.getAccountDescription();

}
